package com.emsys.equipment.domain;

import com.emsys.common.annotation.Excel;
import com.emsys.common.base.BaseEntity;
import com.emsys.system.domain.SysDept;
import com.emsys.system.domain.SysUser;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * 设备信息表 equip_info
 *
 * @author zhangpeng
 * @date 2018-11-02
 */
public class EquipInfo extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /** 设备ID */
    @Excel(name = "设备ID")
    private Long equipId;

    /** 部门ID */
    private Long deptId;

    /** 名称型号 */
    @Excel(name = "名称型号")
    private String namePn;

    /** 序列号 */
    @Excel(name = "序列号")
    private String serialNo;

    /** 负责人 */
    @Excel(name = "负责人")
    private Long supervisorId;

    /** 购置日期 */
    @Excel(name = "购置日期")
    @DateTimeFormat(iso = DateTimeFormat.ISO.DATE)
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date buyTime;

    /** 总价格 */
    @Excel(name = "总价格")
    private String totalPrice;

    /** 高值设备标志（0普通 1高值） */
    @Excel(name = "高值设备标志")
    private String valueFlag;

    /** 质保期(月) */
    @Excel(name = "质保期(月)")
    private Integer warranty;

    /** 放置地点 */
    @Excel(name = "放置地点")
    private String place;

    /** 生产厂家 */
    @Excel(name = "生产厂家")
    private String manufacturer;

    /** 生产国家 */
    @Excel(name = "生产国家")
    private String country;

    /** 售后电话 */
    @Excel(name = "售后电话")
    private String supportPhone;

    /** 功能特色 */
    @Excel(name = "功能特色")
    private String features;

    /** 规格及技术指标 */
    @Excel(name = "规格及技术指标")
    private String specification;

    /** 设备状态（详见字典） */
    @Excel(name = "设备状态")
    private String status;

    /** 审核标志（0未审核 1已审核） */
    @Excel(name = "审核标志")
    private String auditFlag;

    /** 报废审核标志（0未审核 1已审核） */
    @Excel(name = "报废审核标志")
    private String scrapaudit;

    /** 报废日期 */
    @Excel(name = "报废日期")
    @DateTimeFormat(iso = DateTimeFormat.ISO.DATE)
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date scrapTime;

    /** 删除标志（0代表存在 2代表删除） */
    private String delFlag;

    /** 部门对象 */
    private SysDept dept;

    /** 用户对象 */
    private SysUser user;

    public Long getEquipId() {
        return equipId;
    }

    public void setEquipId(Long equipId) {
        this.equipId = equipId;
    }

    public Long getDeptId() {
        return deptId;
    }

    public void setDeptId(Long deptId) {
        this.deptId = deptId;
    }

    public String getNamePn() {
        return namePn;
    }

    public void setNamePn(String namePn) {
        this.namePn = namePn;
    }

    public String getSerialNo() {
        return serialNo;
    }

    public void setSerialNo(String serialNo) {
        this.serialNo = serialNo;
    }

    public Long getSupervisorId() {
        return supervisorId;
    }

    public void setSupervisorId(Long supervisorId) {
        this.supervisorId = supervisorId;
    }

    public Date getBuyTime() {
        return buyTime;
    }

    public void setBuyTime(Date buyTime) {
        this.buyTime = buyTime;
    }

    public Date getScrapTime() {
        return scrapTime;
    }

    public void setScrapTime(Date scrapTime) {
        this.scrapTime = scrapTime;
    }

    public String getTotalPrice() {
        return totalPrice;
    }

    public void setTotalPrice(String totalPrice) {
        this.totalPrice = totalPrice;
    }

    public String getValueFlag() {
        return valueFlag;
    }

    public void setValueFlag(String valueFlag) {
        this.valueFlag = valueFlag;
    }

    public Integer getWarranty() {
        return warranty;
    }

    public void setWarranty(Integer warranty) {
        this.warranty = warranty;
    }

    public String getPlace() {
        return place;
    }

    public void setPlace(String place) {
        this.place = place;
    }

    public String getManufacturer() {
        return manufacturer;
    }

    public void setManufacturer(String manufacturer) {
        this.manufacturer = manufacturer;
    }

    public String getCountry() {
        return country;
    }

    public void setCountry(String country) {
        this.country = country;
    }

    public String getSupportPhone() {
        return supportPhone;
    }

    public void setSupportPhone(String supportPhone) {
        this.supportPhone = supportPhone;
    }

    public String getFeatures() {
        return features;
    }

    public void setFeatures(String features) {
        this.features = features;
    }

    public String getSpecification() {
        return specification;
    }

    public void setSpecification(String specification) {
        this.specification = specification;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getAuditFlag() {
        return auditFlag;
    }

    public void setAuditFlag(String auditFlag) {
        this.auditFlag = auditFlag;
    }

    public String getScrapaudit() {
        return scrapaudit;
    }

    public void setScrapaudit(String scrapaudit) {
        this.scrapaudit = scrapaudit;
    }

    public String getDelFlag() {
        return delFlag;
    }

    public void setDelFlag(String delFlag) {
        this.delFlag = delFlag;
    }

    public SysDept getDept()
    {
        return dept;
    }

    public void setDept(SysDept dept)
    {
        this.dept = dept;
    }

    public SysUser getUser() {return user; }

    public void setUser(SysUser user)
    {
        this.user = user;
    }

    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("equipId", getEquipId())
                .append("deptId", getDeptId())
                .append("deptName", getDept().getDeptName())
                .append("namePn", getNamePn())
                .append("serialNo", getSerialNo())
                .append("supervisorId", getSupervisorId())
                .append("userName", getUser().getUserName())
                .append("buyTime", getBuyTime())
                .append("totalPrice", getTotalPrice())
                .append("valueFlag", getValueFlag())
                .append("warranty", getWarranty())
                .append("place", getPlace())
                .append("manufacturer", getManufacturer())
                .append("country", getCountry())
                .append("supportPhone", getSupportPhone())
                .append("features", getFeatures())
                .append("specification", getSpecification())
                .append("status", getStatus())
                .append("auditFlag", getAuditFlag())
                .append("delFlag", getDelFlag())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .append("remark", getRemark())
                .toString();
    }
}
